package com.prj.ufdm.cloud.ms.core.enums.code;
/**
 * DESC: 职称
 * @author 胡义振
 */
public enum ProfessionalTitleEnum {
	
	MARITAL_STATUS_10("10","高级"),
	MARITAL_STATUS_20("20","中级"),
	MARITAL_STATUS_30("30","初级"),
	MARITAL_STATUS_90("90","其他");
	
	private String code;
	private String message;
	
	ProfessionalTitleEnum(String code,String message){
		this.code = code;
		this.message = message;
	}

	/**
	 * DESC: 根据值获取名称
	 * @param retCode
	 * @return
	 */
	public static String getRetMessage(String retCode){
		String rtnRetCode = "";
		for (ProfessionalTitleEnum codeGenerate : ProfessionalTitleEnum.values()) {
			if(codeGenerate.code.equals(retCode)){
				rtnRetCode = codeGenerate.message;
			}
	    }
		return rtnRetCode;
	}
	
	/**
	 * 
	 * DESC: 根据名称获取值
	 * @param retMessage
	 * @return
	 */
	public static String getRetValue(String retMessage){
		String rtnRetCode = "";
		for (ProfessionalTitleEnum codeGenerate : ProfessionalTitleEnum.values()) {
			if(codeGenerate.message.equals(retMessage)){
				rtnRetCode = codeGenerate.code;
			}
	    }
		return rtnRetCode;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}
}
